package com.bytedance.retrofit2;

import java.lang.reflect.Type;

final class DefaultCallAdapterFactory extends CallAdapter.Factory {
    static final CallAdapter.Factory INSTANCE = new DefaultCallAdapterFactory();

    DefaultCallAdapterFactory() {
    }

    public final CallAdapter get(Type returnType) {
        if (Utils.getRawType(returnType) != Call.class) {
            return null;
        } else {
            final Type responseType = Utils.e(returnType);
            return new CallAdapter<Call<?>>() {
                public final <R> Call<R> adapt(Call<R> call) {
                    return call;
                }

                public final Type responseType() {
                    return responseType;
                }
            };
        }
    }
}

